Integrand size = 19, antiderivative size = 76 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x)) \, dx=\frac {3 a x}{8}+\frac {a \sin (c+d x)}{d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a \sin ^3(c+d x)}{3 d} \]
[Out]
Time = 0.06 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {2827, 2713, 2715, 8} \[ \int \cos ^3(c+d x) (a+a \cos (c+d x)) \, dx=-\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}+\frac {a \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 a x}{8} \]
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2827
Rubi steps \begin{align*} \text {integral}& = a \int \cos ^3(c+d x) \, dx+a \int \cos ^4(c+d x) \, dx \\ & = \frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{4} (3 a) \int \cos ^2(c+d x) \, dx-\frac {a \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d} \\ & = \frac {a \sin (c+d x)}{d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a \sin ^3(c+d x)}{3 d}+\frac {1}{8} (3 a) \int 1 \, dx \\ & = \frac {3 a x}{8}+\frac {a \sin (c+d x)}{d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a \sin ^3(c+d x)}{3 d} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.96 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x)) \, dx=\frac {3 a (c+d x)}{8 d}+\frac {a \sin (c+d x)}{d}-\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin (2 (c+d x))}{4 d}+\frac {a \sin (4 (c+d x))}{32 d} \]
[In]
[Out]
Time = 2.19 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.70
method | result | size |
parallelrisch | \(\frac {a \left (36 d x +3 \sin \left (4 d x +4 c \right )+8 \sin \left (3 d x +3 c \right )+24 \sin \left (2 d x +2 c \right )+72 \sin \left (d x +c \right )\right )}{96 d}\) | \(53\) |
derivativedivides | \(\frac {a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(60\) |
default | \(\frac {a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(60\) |
parts | \(\frac {a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(62\) |
risch | \(\frac {3 a x}{8}+\frac {3 a \sin \left (d x +c \right )}{4 d}+\frac {a \sin \left (4 d x +4 c \right )}{32 d}+\frac {a \sin \left (3 d x +3 c \right )}{12 d}+\frac {a \sin \left (2 d x +2 c \right )}{4 d}\) | \(63\) |
norman | \(\frac {\frac {3 a x}{8}+\frac {13 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {31 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {49 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {3 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {3 a x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {9 a x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {3 a x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {3 a x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}\) | \(148\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.70 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x)) \, dx=\frac {9 \, a d x + {\left (6 \, a \cos \left (d x + c\right )^{3} + 8 \, a \cos \left (d x + c\right )^{2} + 9 \, a \cos \left (d x + c\right ) + 16 \, a\right )} \sin \left (d x + c\right )}{24 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 144 vs. \(2 (70) = 140\).
Time = 0.17 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.89 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x)) \, dx=\begin {cases} \frac {3 a x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 a x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 a x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 a \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {2 a \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {5 a \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {a \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a \cos {\left (c \right )} + a\right ) \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.75 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x)) \, dx=-\frac {32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a}{96 \, d} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.82 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x)) \, dx=\frac {3}{8} \, a x + \frac {a \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {a \sin \left (3 \, d x + 3 \, c\right )}{12 \, d} + \frac {a \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {3 \, a \sin \left (d x + c\right )}{4 \, d} \]
[In]
[Out]
Time = 17.69 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.04 \[ \int \cos ^3(c+d x) (a+a \cos (c+d x)) \, dx=\frac {3\,a\,x}{8}+\frac {\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {49\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}+\frac {31\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12}+\frac {13\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^4} \]
[In]
[Out]